/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package classes;

import java.util.ArrayList;

/**
 *
 * @author Filippo
 */


public class quadtreenode {
    
    public quadtreenode topleft = null;
    public quadtreenode topright = null;
    public quadtreenode bottomleft = null;
    public quadtreenode bottomright = null;
    
    public quadtreenode parentnode = null;
    
    public ArrayList <vertice> generators = null;
    
    public nodelabels nodetypes;
    
    public vertice getgenerator(int index){
        
        if(this.generators == null) 
            return null;
        
        else return this.generators.get(index);
    
    }
    
    public void addgenerator(vertice generator){
    
        if(this.generators == null)
            this.generators = new ArrayList <vertice>();
        this.generators.add(generator);
    }
    
    public void setgenerators(ArrayList <vertice> g){
    
        this.generators = g;
    }
    
    
    public int getgeneratorcount(){
    
        int result = 0;
        if(this.generators == null) ;
        else result = this.generators.size();
        
        return result;
    }
}
